﻿@model www.Models.FilesModel
@{
    ViewBag.Title = "Files";
}

<link rel="Stylesheet" href="../../Content/jquery.contextMenu.css"  />
<script src="../../Scripts/jquery.contextMenu.js"></script>
<script src="../../Scripts/RootSync.files.js"></script>
@section bodytop {
<ul id="mnuFolder" class="contextMenu">
    <li class="edit"><a href="#open">Open</a></li>
    <li class="edit"><a href="#delete">Delete</a></li>
</ul>
<ul id="mnuFile" class="contextMenu">
    <li class="edit"><a href="#open">Open</a></li>
    <li class="edit"><a href="#delete">Delete</a></li>
    <li class="edit"><a href="#download">Download</a></li>
    <li class="edit"><a href="#rename">Rename</a></li>
    <li class="edit"><a href="#unopen">Mark as Unopened</a></li>
</ul>
}

<div style="display:none;" id="divInputDialog">
    <span id="spnInputLabel"></span><input type="text" id="txtInputText" value="" />
</div>

    <div id="MenuRow">
        <div id="MenuIcon">
            @if (ViewBag.ShowGT)
            {
                <a href='@Url.Content("~/files/" + ViewBag.parentpath)'> 
                    <img src='@Url.Content("~/Content/index_up.png")' border="0" /></a> 
            }
            else
            {
                <a href='@Url.Content("~/files/" + ViewBag.parentpath)'> 
                    <img src='@Url.Content("~/Content/index.png")' border="0" /></a> 
            }
        </div>

            @if (ViewBag.ShowGT)
            {
                <div id="MenuGT">
                <img src="@Url.Content("~/Content/GreaterThan.png")" border="0" />
                </div>
            }
        <div id="MenuLocation">@ViewBag.FolderName</div>


        <div id="MenuOptions" class="clearFix">
            @*/FileActions/UploadFile?path=@ViewBag.path.Replace(" ", "%20")*@
                <button class="jqButton" onclick="rootsync.files.uploadFile()">Upload File</button>
            @* /FileActions/NewFolder?path=@ViewBag.path.Replace(" ", "%20") *@
                @*<a class="openDialog" data_dialog_id="createDialog" data_dialog_title="New Folder" href="">*@
                <button class="jqButton" onclick="rootsync.files.newFolder()">New Folder</button>
        </div>
    </div>
    <div id="HeaderRow">
        <div id="HeaderName"><input type="checkbox" id="cbHeader" name="cbHeader" onclick="rootsync.files.cbHeader_OnClick(this)" /><span style="padding-left: 8px;">Name</span></div>
        <div id="HeaderAttributes">
            <div class="clsFileSize">Size</div><div class="clsFileModified">Last Modified</div>
        </div>
    </div>
    <div id="_index">
    @Html.Partial("DirectoryList", Model)
    </div>
